import request from "../../../utils/request";

//头部分类列表管道
export interface SubjectCategoryModel{
cid:number,
title:string,
name:string
pageView:number
}

//头部分类列表管道
export interface SubjectListModel{
  pageNo:number
  pageSize:number
  hasMore:boolean
  totalCount:number
  categoryId:number
  categoryName:string
  categoryTitle:string
  subjects:QueryObject[]
}

export type AnyObject = {
  [propsName:string]:any
}
export type QueryObject = {
  id: string | number,
  [propsName: string]: any
}


export default{
  // 获取头部分类列表/revision/subject/category
  findSubjectCategory(){
    return request.get(`/revision/subject/category`)
  },

  //获取列表详情revision/subject/categorySubjectList/{title}?pageNum={pageNum}&pageSize={pageSize}
  findcategorySubjectList(title:string,pageNum:number,pageSize:number){
    return request.get<any,AnyObject>(`revision/subject/categorySubjectList/${title}?pageNum=${pageNum}&pageSize=${pageSize}`)
  }
}


